package com.healthy.suggestions.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.suggestions.mapper.HealthAdviceMapper;
import com.healthy.suggestions.domain.HealthAdvice;
import com.healthy.suggestions.service.IHealthAdviceService;

/**
 * 医学建议Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class HealthAdviceServiceImpl implements IHealthAdviceService 
{
    @Autowired
    private HealthAdviceMapper healthAdviceMapper;

    /**
     * 查询医学建议
     * 
     * @param id 医学建议主键
     * @return 医学建议
     */
    @Override
    public HealthAdvice selectHealthAdviceById(Long id)
    {
        return healthAdviceMapper.selectHealthAdviceById(id);
    }

    /**
     * 查询医学建议列表
     * 
     * @param healthAdvice 医学建议
     * @return 医学建议
     */
    @Override
    public List<HealthAdvice> selectHealthAdviceList(HealthAdvice healthAdvice)
    {
        return healthAdviceMapper.selectHealthAdviceList(healthAdvice);
    }

    /**
     * 新增医学建议
     * 
     * @param healthAdvice 医学建议
     * @return 结果
     */
    @Override
    public int insertHealthAdvice(HealthAdvice healthAdvice)
    {
        return healthAdviceMapper.insertHealthAdvice(healthAdvice);
    }

    /**
     * 修改医学建议
     * 
     * @param healthAdvice 医学建议
     * @return 结果
     */
    @Override
    public int updateHealthAdvice(HealthAdvice healthAdvice)
    {
        return healthAdviceMapper.updateHealthAdvice(healthAdvice);
    }

    /**
     * 批量删除医学建议
     * 
     * @param ids 需要删除的医学建议主键
     * @return 结果
     */
    @Override
    public int deleteHealthAdviceByIds(Long[] ids)
    {
        return healthAdviceMapper.deleteHealthAdviceByIds(ids);
    }

    /**
     * 删除医学建议信息
     * 
     * @param id 医学建议主键
     * @return 结果
     */
    @Override
    public int deleteHealthAdviceById(Long id)
    {
        return healthAdviceMapper.deleteHealthAdviceById(id);
    }
}
